<%-- 
    Document   : edit-disciplina
    Created on : 13/06/2013, 14:51:10
    Author     : Eduardo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="Model.*"%>
<%@page import="Controller.*"%>
<%@page import="java.sql.*" %> 
<%@page import="java.io.*" %>

<%
    String cod = request.getParameter("id");
    Query v = new Query();
    Disciplina disc = v.getDisc(cod);
//if (disc.next()) {
%>
<script src="js/script.js"></script> 
<div class="modal-header">  
    <a class="close" data-dismiss="modal">×</a>  
    <h3>Editar Disciplina: <% out.println(disc.getNome());%></h3>
</div>
<div class="modal-body">
    <div id="info"></div>
    <form class="form-horizontal" id="editar">
        <div class="control-group">
            <label class="control-label" for="inputNome">Nome:</label>
            <div class="controls">
                <input type="text" id="inputNome" placeholder="Nome" name="nome" value="<% out.println(disc.getNome());%>">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputCodigo">Código:</label>
            <div class="controls">  
                <input type="text" id="inputCodigo" placeholder="Código" name="cod" value="<% out.println(disc.getCod());%>">    
            </div>
        </div>                          
        <div class="control-group">
            <label class="control-label" for="inputResumo">Resumo:</label>
            <div class="controls">
                <textarea id="inputResumo" name="resumo" rows="10" cols="5"><% out.println(disc.getResumo());%></textarea>    
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputCH">Carga Horária:</label>
            <div class="controls">
                <input type="text" id="inputCH" placeholder="Carga horária" name="cargahoraria" value="<% out.println(disc.getCargahoraria());%>">    
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputCH">Crédito:</label>
            <div class="controls">
                <input type="text" id="inputCredito" placeholder="Crédito" name="creditos" value="<% out.println(disc.getCredito());%>">    
            </div>
        </div>
        <input type="hidden" id="inputID" name="id" value="<% out.print(disc.getId());%>">
        <input type="hidden" id="action" name="action" value="editdisciplina">
    </form>
</div>
<div class="modal-footer">  
    <a class="btn btn-success salvar" xform="editar" xid="<% out.println(disc.getId());%>" url="edit-disciplina.jsp">Salvar</a>  
    <a class="btn btn-inverse fechar" data-dismiss="modal">Fechar</a>  
</div>



<% //} %>
